package com.sky.service;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Delete;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

public interface ShoppingCartService {
    /**
     * 添加商品
     * @param shoppingCartDTO
     */
    void addShoppingCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 查询购物车
     * @param id
     * @return
     */
    List<ShoppingCart> getListByUserId(Long id);

    /**
     * 清空购物车
     * @param userId
     */
    void clearShoppingCart(Long userId);
}
